package net.adetech.crj.dao;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

public class Dictionary extends Model<Dictionary>{
    public static final Dictionary dao = new Dictionary().dao();

    public static Dictionary getDictionaryByName(String name)
    {
        List<Dictionary> dictionaryList = dao.find("select * from CRJ_DICT where DICT_NAME = ?",name);
        if (dictionaryList!=null&&dictionaryList.size()>0)
        {
            return dictionaryList.get(0);
        }
        else {
            return null;
        }

    }
}
